<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>tm-Title</title>
    <link rel="stylesheet" href="css/show.css" type="text/css">
    <script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
    <script>
        $(function (){
            init();
        })
        function init(){
            $.ajax({
                url:"getAllInformations",
                dataType:"json",
                async:false,
                success:function (list){
                    $(list).each(function (i,Informations){
                        var tr=$("<tr></tr>");
                        var td1=$("<td>"+Informations.id+"</td>");
                        var td2=$("<td></td>");
                        var a=$("<a href=tophoneinfo?id="+Informations.id+">"+Informations.title+"</a>");
                        td2.append(a);
                        var td3=$("<td>"+Informations.replycount+"/"+Informations.viewcount+"</td>");
                        var td4=$("<td>"+Informations.reporttime+"</td>");
                        var td5=$("<td>"+Informations.lastposttime+"</td>");
                        tr.append(td1,td2,td3,td4,td5);
                        $("table").append(tr);
                    })
                }
            })
        }
    </script>
</head>
<body>
    <div class="father">
        <div class="head">
            <h1>手机资讯</h1>
            <table>
                <tr id="tablehead">
                    <th>序号</th>
                    <th>标题</th>
                    <th>回复/查看</th>
                    <th>发表时间</th>
                    <th>最新回复</th>
                </tr>
            </table>
        </div>
    </div>
</body>
</html>